fspc(opt.log,"info"); fprintf(opt.log,"Note: robots.txt forbidden links for %s are: %s"LF,urladr,infobuff);
test_flush;
}
}
if (opt.errlog!=NULL) {
fspc(opt.errlog,"info"); fprintf(opt.errlog,"Note: due to %s remote robots.txt rules, links begining with these path will be forbidden: %s (see in the options to disable this)"LF,urladr,infobuff);
test_flush;
}
}
}
}
} else if (r.is_write) { // dΘja sauvΘ sur disque
/*
if (!ishttperror(r.statuscode))
HTS_STAT.stat_files++;
HTS_STAT.stat_bytes+=r.size;
*/
//printf("ok......\n");
} else {
// Si on doit sauver une page HTML sans la scanner, cela signifie que le niveau de
// rΘcursion nous en empΩche
// Dans ce cas on met un fichier indiquant ce fait
// Si par la suite on doit retraiter ce fichier avec un niveau de rΘcursion plus
// fort, on supprimera le readme, et on scannera le fichier html!
// note: sautΘ si store_errpage (cαd si page d'erreur, non α scanner!)
if ( (is_hypertext_mime(r.contenttype, urlfil)) && (!store_errpage) && (r.size>0)) { // c'est du html!!
char BIGSTK tempo[HTS_URLMAXSIZE*2];
FILE* fp;
tempo[0]='\0';
strcpybuff(tempo,savename);
strcatbuff(tempo,".readme");
#if HTS_DOSNAME
// remplacer / par des slash arriΦre
{
int i=0;
while(tempo[i]) {
if (tempo[i]=='/')
tempo[i]='\\';
i++;
}
}
// a partir d'ici le slash devient antislash
#endif
if ((fp=fopen(tempo,"wb"))!=NULL) {
fprintf(fp,"Info-file generated by HTTrack Website Copier "HTTRACK_VERSION"%s"CRLF""CRLF, WHAT_is_available);
fprintf(fp,"The file %s has not been scanned by HTS"CRLF,savename);
fprintf(fp,"Some links contained in it may be unreachable locally."CRLF);
fprintf(fp,"If you want to get these files, you have to set an upper recurse level, ");
fprintf(fp,"and to rescan the URL."CRLF);
fclose(fp);
#if HTS_WIN==0
chmod(tempo,HTS_ACCESS_FILE);
#endif
usercommand(&opt,0,NULL,fconv(tempo),"","");
}
if ( (opt.debug>0) && (opt.errlog!=NULL) ) {
fspc(opt.errlog,"warning"); fprintf(opt.errlog,"Warning: store %s without scan: %s"LF,r.contenttype,savename);
"HTTrack Website Copier/"HTTRACK_VERSION" mirror complete in %s : "
"%d links scanned, %d files written ("LLintP" bytes overall)%s "
"["LLintP" bytes received at "LLintP" bytes/sec]",
htstime,
(int)lien_tot-1,
(int)HTS_STAT.stat_files,
(LLint)HTS_STAT.stat_bytes,
infoupdated,
(LLint)HTS_STAT.HTS_TOTAL_RECV,
(LLint)n
);
if (HTS_STAT.total_packed > 0 && HTS_STAT.total_unpacked > 0) {
int packed_ratio=(int)((LLint)(HTS_STAT.total_packed*100)/HTS_STAT.total_unpacked);
sprintf(finalInfo + strlen(finalInfo),", "LLintP" bytes transfered using HTTP compression in %d files, ratio %d%%",(LLint)HTS_STAT.total_unpacked,HTS_STAT.total_packedfiles,(int)packed_ratio);
// on ne met pas le fichier en backing si il doit Ωtre traitΘ aprΦs
if (liens[p]->pass2) { // 2Φ passe
if (numero_passe!=1)
ok=0;
} else {
if (numero_passe!=0)
ok=0;
}
// note: si un backing est fini, il reste en mΘmoire jusqu'α ce que
// le ptr l'atteigne
if (ok) {
int index = back_index(sback, liens[p]->adr,liens[p]->fil,liens[p]->sav);
if (index < 0) {
if (back_add(sback,opt,cache,liens[p]->adr,liens[p]->fil,liens[p]->sav,liens[liens[p]->precedent]->adr,liens[liens[p]->precedent]->fil,liens[p]->testmode,&liens[p]->pass2)==-1) {
if ( (opt->debug>1) && (opt->errlog!=NULL) ) {
fspc(opt->errlog,"debug"); fprintf(opt->errlog,"error: unable to add more links through back_add for back_fill"LF);